<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let result=prompt("请输入水果名称")
        switch(result) {
            case "苹果":
                alert("苹果的价格是10元")
                break;
            case "香蕉":
                alert("香蕉的价格是20元")
                break;
            case "橘子":
                alert("橘子的价格是30元")
                break;
            default:
                alert("没有这个水果")
                break;
        }
    </script>
</body>
</html>